The Perils of Repeating Patterns: Observation of Some Weak Keys in RC4

نویسندگان

  • Joachim Strömbergson
  • Simon Josefsson
چکیده

We describe some observed trivially weak keys for the stream cipher RC4. Keys with repeating patterns are found to be key length invariant. The cause of the problem is the simplistic key dependent state permutation in the RC4 initialization. Introduction While writing the draft for RFC 6229 [1] and testing suitable test vectors, we observed that for some keys with different lengths, the stream cipher RC4 [2] generated identical keystreams. Typical test patterns we tested were patterns where odd or even bits are set, as well as repeated sequences of byte values. What we saw was that these patterns generated the same keystream irrespectively of the key length used. The following two sets of keys illustrates the behaviour: Key k1 = [0x55,0x55,0x55,0x55,0x55] (40 bit) Key k2 = [0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55] (64 bit) Generated keystream: 0x06,0xfe,0x68,0xd8,0x0,0xf9,... Key k3 = [0x01,0x02,0x03,0x04] (32 bit) Key k4 = [0x01,0x02,0x03,0x04,0x01,0x02,0x03,0x04] (64 bit) Generated keystream: 0x1c,0xea,0x91,0x61,0xee,0xbc,... Problem Description and Analysis The RC4 stream cipher contains a Key Scheduling Algorithm (KSA) as given by the following pseudo code: for i from 0 to 255 (1) S[i] = i (2) j = 0 (3) for i from 0 to 255 (4) j = (j + S[i] + key[i mod keylength]) mod 256 (5) swap(S[i], S[j]) (6) The only key dependent operation of the KSA is the update of the j pointer in (5). Using the values of the bytes in the key, we add a displacement to j, which then affects the byte swap operation of the state S in (6). Since the byte values in the key are accessed in sequence and cyclicly in (5), any key that consists 1 Joachim at secworks.se 2 Simon at josefsson.org

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Generalized Classes of Weak Keys on RC4 Using Predictive State

Conventional class of weak keys on RC4 stream cipher is defined as a specific case that combinations of the first three bytes of secret key satisfy two relational equations. This paper expands and generalizes the classes of weak keys using generalized relational equations and special classes of the internal state (called predictive state). We derive the probability that generalized classes of w...

متن کامل

Key-Dependent Weak IVs and Weak Keys in WEP - How to Trace Conditions Back to Their Patterns -

The WEP (Wired Equivalent Privacy) is a part of IEEE 802.11 standard designed for protecting over the air communication. While almost all of the WLAN (Wireless LAN) cards and the APs (Access Points) support WEP, a serious key recovery attack (aka FMS attack) was identified by Fluhrer et al. The attack was then extended and implemented as WEP cracking tools. The key recovery attacks can basicall...

متن کامل

Attacks on the RC4 stream cipher

In this article we present some weaknesses in the RC4 cipher and their cryptographic applications. Especially we improve the attack described in [2] in such a way, that it will work, if the weak keys described in that paper are avoided. A further attack will work even if the first 256 Byte of the output remain unused. Finally we show that variants of the RC4 algorithm like NGG and RC4A are also...

متن کامل

Weaknesses in the Key Scheduling Algorithm of RC4

In this paper we present several weaknesses in the key scheduling algorithm of RC4, and describe their cryptanalytic significance. We identify a large number of weak keys, in which knowledge of a small number of key bits suffices to determine many state and output bits with non-negligible probability. We use these weak keys to construct new distinguishers for RC4, and to mount related key attac...

متن کامل

A New Class of RC4 Colliding Key Pairs with Greater Hamming Distance

In this paper, we discovered a new class of colliding key pairs of RC4, namely, two different secret keys generate the same internal state after RC4’s key scheduling algorithm. This is to our knowledge the first discovery of RC4 colliding keys with hamming distance greater than one, that is, the colliding key pairs we found can differ from each other at three different positions, and the value ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • IACR Cryptology ePrint Archive

دوره 2013  شماره 

صفحات  -

تاریخ انتشار 2013